﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Admin_Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>大角后台管理系统</title>
    <link href="Resources/Themes/main.css" rel="stylesheet" type="text/css" />
    <link href="Resources/Themes/easyui.css" rel="stylesheet" type="text/css" />
    <link href="Resources/Themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="Resources/js/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="Resources/js/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="Resources/js/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        function AddTabs(url, title) {
            if ($('#MainWindow').tabs('exists', title)) {
                $('#MainWindow').tabs('select', title);
            } else {
                $('#MainWindow').tabs('add', {
                    title: title,
                    content: '<iframe src="' + url + '" width="100%" height="100%" frameborder="0"></iframe>',
                    closable: true
                });
            }
        }
        function Logout() {
            $.messager.confirm('系统消息', '您确定退出系统吗？', function (r) {
                if (r) {
                    window.location.href = "Login/Logout.aspx";
                }
            });
        }

        function ModifyPassword() {
            $('#ModifyPassword').show();
            $('#ModifyPassword').dialog({
                title: '修改密码',
                width: 400,
                height: 200,
                closed: false,
                cache: false,
                modal: true
            });
        }
    </script>

</head>
<body class="easyui-layout">
    <form id="form1" runat="server">
        <div data-options="region:'north'" style="height: 60px; padding: 0; background-color: #8DB2E3; overflow: hidden;">
            <h1 style="padding-left: 40px;">大角后台管理系统</h1>
        </div>
        <div data-options="region:'south'" style="height: 26px; background-color: #8DB2E3;">
            <table id="FooterTable">
                <tr>
                    <td width="200px;">
                        <span>当前登录用户：</span> <span style="color: Red;">
                            <asp:Label ID="labLoginUser" runat="server" Text=""></asp:Label>
                        </span>
                    </td>
                    <td width="auto"></td>
                    <td class="Icon">
                        <a href="javascript:void(0)" onclick="ModifyPassword()">修改密码</a>
                    </td>
                    <td class="Icon">
                        <a href="javascript:void(0)" onclick="Logout()">退出系统</a>
                    </td>
                    <td class="Item">Ver:1.0.0
                    </td>
                </tr>
            </table>
        </div>
        <div data-options="region:'west'" title="系统菜单" style="width: 220px; padding: 0px; overflow: hidden;">
            <div id="Menu" class="easyui-accordion" data-options="fit:true,border:false">
                <%--循环目录--%>
                <% for (int i = 0; i < dt_list.Rows.Count; i++)
                   {
                       if (Convert.ToInt32(dt_list.Rows[i]["ParentId"]) == 0)
                       {
                %>
                <div title="【<%= dt_list.Rows[i]["ModuleName"].ToString() %>】">
                    <% for (int j = 0; j < dt_list.Rows.Count; j++)
                       {
                           if (Convert.ToInt32(dt_list.Rows[j]["ParentId"]) == Convert.ToInt32(dt_list.Rows[i]["ModuleId"]))
                           {
                    %>
                    <p onclick='AddTabs("<%= dt_list.Rows[j]["Href"].ToString() %>","<%= dt_list.Rows[j]["ModuleName"].ToString() %>")'>
                        <%= dt_list.Rows[j]["ModuleName"].ToString() %>
                    </p>
                    <%
                           }
                       }%>
                </div>
                <%
                       }
                   }%>
            </div>
        </div>
        <div data-options="region:'center'" style="overflow: hidden;">
            <div id="MainWindow" class="easyui-tabs" data-options="fit:true,border:false">
                <div title="首页" style="overflow: hidden;">
                    <iframe src="about:blank" frameborder="0" width="100%" height="100%"></iframe>
                </div>
            </div>
        </div>
        <div id="ModifyPassword" style="overflow:hidden;display:none;">
            <iframe src="Login/ModifyPassword.aspx" frameborder="0" width="100%" height="100%" scrolling="no"></iframe>
        </div>
    </form>
</body>
</html>
